<template>
    <div>
        子组件--{{ msg }}
    </div>
</template>
<script>
import Event from '@/utils/eventBus';
export default{
    mounted(){
        Event.$on('aaa',(v)=>{
            console.log(v);
            this.msg=v;
        })

        Event.$emit('bbb',this.data);
    },
    data(){
        return {
            msg:'',
            data:'子组件的数据'
        }
    }
}
</script>